package com.erp.erp_entitys.DictionaryKey;


import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author 
 * 字典表key表
 */
 public class DictionaryTreeEntity implements Serializable {
    /**
     * 编码
     */
     private Integer code;

    /**
     * 名称
     */
     private String name;

    /**
     * 创建时间
     */
     private Date createtime;

    /**
     * 更新时间
     */
     private Date updatetime;

    /**
     * 创建人（员工号）
     */
     private String createor;

    /**
     * 是否必填（1：必填；0：可选）
     */
     private Integer required;

    /**
     * 父节点
     */
     private String parentcode;

    /**
     * 是否叶子节点
     */
     private Integer leaf;

    /**
     * 图标ICON
     */
     private String img;

    /**
     * 描述
     */
     private String desc;

    /**
     * 顺序号
     */
     private Integer index;
     private List<DictionaryTreeEntity> list;

    public List<DictionaryTreeEntity> getList() {
        return list;
    }

    public void setList(List<DictionaryTreeEntity> list) {
        this.list = list;
    }

    private static final long serialVersionUID = 1L;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public String getCreateor() {
        return createor;
    }

    public void setCreateor(String createor) {
        this.createor = createor;
    }

    public Integer getRequired() {
        return required;
    }

    public void setRequired(Integer required) {
        this.required = required;
    }

    public String getParentcode() {
        return parentcode;
    }

    public void setParentcode(String parentcode) {
        this.parentcode = parentcode;
    }

    public Integer getLeaf() {
        return leaf;
    }

    public void setLeaf(Integer leaf) {
        this.leaf = leaf;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    @Override
    public String toString() {
        return "DictionaryTreeEntity{" +
                "code=" + code +
                ", name='" + name + '\'' +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", createor='" + createor + '\'' +
                ", required=" + required +
                ", parentcode='" + parentcode + '\'' +
                ", leaf=" + leaf +
                ", img='" + img + '\'' +
                ", desc='" + desc + '\'' +
                ", index=" + index +
                ", list=" + list +
                '}';
    }
    public DictionaryTreeEntity conver(DictionaryKeyEntity dke){
        DictionaryTreeEntity dte=new DictionaryTreeEntity();
        dte.setCode(dke.getCode());
        dte.setCreateor(dke.getCreateor());
        dte.setCreatetime(dke.getCreatetime());
        dte.setDesc(dke.getDesc());
        dte.setImg(dke.getImg());
        dte.setIndex(dke.getIndex());
        dte.setLeaf(dke.getLeaf());
        dte.setName(dke.getName());
        dte.setParentcode(dke.getParentcode());
        dte.setRequired(dke.getRequired());
        dte.setUpdatetime(dke.getUpdatetime());
        return dte;
    }
}